package com.ssm.curd.service.impl;

import com.ssm.curd.bean.Employee;
import com.ssm.curd.dao.EmployeeMapper;
import com.ssm.curd.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * (TblEmp)表服务实现类
 *
 * @author zhaojiulin
 * @since 2019-11-28 15:35:45
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    /**
     * 获取全部列表
     * @return
     */
    public List<HashMap> getAll(){
        return employeeMapper.selectByAllWithDept(null);
    }

    /**
     * 保存对象
     * @param employee
     */
    public void saveEmp(Employee employee) {
        employeeMapper.insertSelective(employee);
    }
}